package com.codeoss.framework.view.service.impl;

import org.springframework.stereotype.Service;

import com.codeoss.framework.context.YunContext;
import com.codeoss.framework.expression.Expression;
import com.codeoss.framework.view.component.Component;
import com.codeoss.framework.view.component.DataGrid;

@Service("datagridComponentService")
public class DataGridComponentService extends ContainerService {
	@Override
	public void processEvent(YunContext yunContext, Component component, String eventType) {
		// TODO Auto-generated method stub
		super.processEvent(yunContext, component, eventType);
		DataGrid dataGrid=(DataGrid)component;
		if ("paginationEvent".equals(eventType)) {
			Expression onPagination = dataGrid.getOnPagination();
			if (onPagination != null) {
				executeEventExpression(yunContext, component, onPagination,null);
			}
		}
	}
}
